<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@include file="/WEB-INF/webpage/common/taglibs.jspf"%>
<!DOCTYPE html>
<html>
<head>
  <title>拼多多分类列表</title>
  <meta name="decorator" content="list"/>
</head>
<body title="拼多多分类">
<grid:grid id="pddCategoryGridId" url="${adminPath}/pinduoduo/pddcategory/ajaxList">
	<grid:column label="sys.common.key" hidden="true"   name="id" width="100"/>
	<grid:column label="sys.common.opt"  name="opt" formatter="button" width="100"/>
	<grid:button groupname="opt" function="delete" />
    <grid:column label="商品类目名称"  name="catName"   query="true"  queryMode="input"  condition="eq"  />
    <grid:column label="图标"  name="icon" />
    <grid:column label="是否显示"  name="show"  query="true"  queryMode="input"  condition="eq" />
    <grid:column label="分类code"  name="catId" />
    <grid:column label="级别"  name="level" />
    <grid:column label="父类类目"  name="ParentId" />

	<grid:toolbar function="create"/>
	<grid:toolbar function="update"/>
	<grid:toolbar function="delete"/>

    <grid:toolbar   title="sys.pdd.category"  onclick="getPddCategory()" icon="fa-hand-grab-o"/>
    <grid:toolbar function="search"/>
	<grid:toolbar function="reset"/>
</grid:grid>

<script>
    function getPddCategory() {
        swal({
                title: "拼多多分类数据抓取",
                text: "由于数据较多，所以抓取时间较长，请耐心等待！",
                type: "info",
                showCancelButton: true,
                closeOnConfirm: false,
                showLoaderOnConfirm: false,
                timer: 2000
            },
            function(){
                $.get("/admin/pinduoduo/pddcategory/saveCategory", function () {
                    swal("数据抓取完成！");
                })

            });
    }
</script>
</body>
</html>